<?php

$boy = trim($_POST['boy']);
$girl= trim($_POST['girl']);
$adminName = trim($_POST['adminName']);
$pw = trim($_POST['pw']);
$title = trim($_POST['title']);
$logo = trim($_POST['logo']);
$writing = trim($_POST['writing']);
include_once 'connect.php';
if ($pw){

}
$sql = "update text set title = '$title', logo = '$logo' , writing = '$writing', adminName = '$adminName' ,pw ='".md5($pw)."' where adminName = '$adminName'";
$result = mysqli_query($connect,$sql);
if ($result){
    echo "<script>alert('更新成功');location.href = 'Set.php';</script>";
}else{
    echo "<script>alert('更新失败');history.back();</script>";
}